package com.bdqn;

/**
 * 新闻模板业务类
 */
public class NewsServiceImpl implements NewsService{
    //实例化所依赖的NewsDao对象
    private NewsDao dao = new NewsDaoImpl();

    private NewsDao dao1 = SimpleDaoFactory.getInstance();

    @Override
    public void save(News news) {
        //调用NewsDao的方法保存新闻信息
        dao.save(news);
    }

    private NewsDao dao2;
    public void setDao(NewsDao dao2){
        this.dao2 = dao;
    }

}
